﻿using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Core.SimpleTemp.Common
{
    public static class HttpResponseExtension
    {



        public static string CreateAjaxResponseExceptionJson(this HttpResponse httpResponse, Exception exception, bool isDevelopment,string traceIdentifier)
        {
            var jsonErrorResponse = ExceptionHelp.CreateErrorJson(exception, isDevelopment,traceIdentifier);
            var jsonStr = JsonConvert.SerializeObject(jsonErrorResponse);
            return jsonStr;
        }
    }
}
